<?php
/**
 * a blog models test case for dj.models
 *
 * @package
 * @subpackage
 * @author J.Ducastel <nospam0@ducastel.name>
 */

/**
 *
 */
class DjBlogPost extends DjModel {

    /* public methods, then properties */

    public static function fields() {
        return array(
            'title' => new DjTextField()
        );
    }

    /* private methods, then properties */

}

/**
 *
 */
class TestBlog extends UnitTestCase {

    /* public methods, then properties */

    /**
     *
     * /
    function testMinimal() {
        $obj = new DjModel_Minimal();
        $text = "text into DjTextField";
        $obj->text = $text;
        $this->assertEqual($obj->text, $text, '$obj->text = text should affect the model attribute as $text');
        // saving
        $this->assertTrue($obj->save(), "Djmodel->save() should return true");
        $this->assertNotNull($obj->id, "DjModel->id should have been automatically set");
        // try reloading
        $objects_type = 'DjManager';
        $this->assertIsA(DjModel_Minimal::objects(), $objects_type, "objects() shall return a $objects_type");
        //$obj2 = DjModel_Minimal::objects().get($id);
    }/**/

    /* private methods, then properties */

}